﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using VirtualPress.Portal.Biz;
using VirtualPress.Tool.Framework;
using VirtualPress.Portal.WebLogic;

namespace VirtualPress.Portal.Web.Controllers
{
    [ErrorHandle]
    public class HandleController : Controller
    {
        public void download(string file,string security)
        {
            if (SecurityBiz.DownloadFileValid(security))
            {
                string path = EncodeByBase64.Decode(file);
                if (!String.IsNullOrEmpty(path))
                {
                    FileDownLoad.DownLoadFile(System.Web.HttpContext.Current.Request, System.Web.HttpContext.Current.Response, path);
                }
            }
        }

    }
}
